﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace lcmyjobs.Web.reward
{
    public partial class reward_index : BasePage
    {
        lcmyjobs.BLL.user_basic bub = new BLL.user_basic();
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                this.Title = string.Format("悬赏招聘&bull;悬赏求职首页   人才网   招聘网   求职网   猎头网   {0}", Application["webname"].ToString());
                int id = int.Parse(Application["webid"].ToString());
                lcmyjobs.BLL.adverts ad = new BLL.adverts();
                DataSet ds = ad.GetAdvnid(28);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    this.HyperLink1.ImageUrl = "~" + ds.Tables[0].Rows[0][0].ToString();
                    this.HyperLink1.NavigateUrl = ds.Tables[0].Rows[0][1].ToString();
                }
                getcout(id);
                //bindData(); //使用url分页，只需在分页事件处理程序中绑定数据即可，无需在Page_Load中绑定，否则会导致数据被绑定两次
                BindAcsx(id);
            }

        }
        protected void getcout(int atid)
        {
            int count;
            DataSet ds = bub.PageUserRewardList(atid, 1, 10, out count);
            GridView1.DataSource = ds.Tables[0];
            GridView1.DataBind();
        }

        private void BindAcsx(int atid)
        {
            //this.GridRewardJobs1.atid = atid;
            //this.GridRewardJobs1.isAspPager = false;
            //this.GridRewardJobs1.disCount = 15;
        }
    }
}